package Version3;


import javax.swing.JFrame;
import javax.swing.JOptionPane;


public class Main {


	/**
	 * @param args
	 */
	public static void main(String[] args){

		int size; 
		do {
			size = Integer.parseInt(JOptionPane.showInputDialog("Insert size.\nSize must be between 3 and 6. (Inclusive)"));
		} while (size < 3 || size > 6); //Make sure input is on the right dimension

		Controls controls = new Controls(size);


		JFrame frame = new JFrame();
		frame.setSize(900,422);

		frame.addKeyListener(controls);
		frame.add(controls);

		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setResizable(false);
		frame.setVisible(true);


	}


}
